package cj.web.portal.dao;

import java.util.List;
import java.util.Map;
import net.paoding.rose.jade.annotation.DAO;
import net.paoding.rose.jade.annotation.SQL;

@DAO
public interface CategoryVoDAO{
	
    @SQL("SELECT id,pid,name,value,pValue FROM Category WHERE id=:1 AND pid=:2 AND deleteFlag =1 ORDER BY orderNo ")
    List<Map> queryByIdandPid(int id,int pid);
    
    @SQL("SELECT id,pid,name,value,pValue FROM Category WHERE pid=:1 AND deleteFlag =1 ORDER BY orderNo ")
    List<Map> queryByPid(int pid);
    
    @SQL("SELECT id,pid,name,value,pValue FROM Category WHERE id=:1 AND deleteFlag =1 ORDER BY orderNo ")
    List<Map> queryById(int id);

	@SQL("SELECT id,pid,name FROM Category WHERE deleteFlag=1 AND value=:1 AND pValue=:2 GROUP BY name ORDER BY orderNo ")
    List<Map> queryCategorylis(String value,String pValue);
}